package exam;

/**
 * Tests the answer to the second recursion question.
 * The text of the question is as follows:
 * "Write a recursive method that returns the n-th value in the Fibonacci sequence."
 * 
 * @author Branden Ogata
 *
 */

public class TestRecursionA01 extends Tester
{
  public static void main(String[] args)
  {
    final double points = getPoints(args);
    
    RecursionA01 question = new RecursionA01();
    System.out.println(test(Category.EQUALS, "fibonacci(0):", 0, 
                            question.fibonacci(0), percentageToPoints(FIFTH, points)));
    System.out.println(test(Category.EQUALS, "fibonacci(1):", 1, 
                            question.fibonacci(1), percentageToPoints(FIFTH, points)));
    System.out.println(test(Category.EQUALS, "fibonacci(2):", 1, 
                            question.fibonacci(2), percentageToPoints(FIFTH, points)));
    System.out.println(test(Category.EQUALS, "fibonacci(4):", 3, 
                            question.fibonacci(4), percentageToPoints(FIFTH, points)));
    System.out.println(test(Category.EQUALS, "fibonacci(9):", 34, 
                            question.fibonacci(9), percentageToPoints(FIFTH, points)));

    System.out.format("[%.2f/%.2f]%n", getTotalPoints(), points);
  }
}
